

//import java.util.Collection;

//import valerij_timakov.home_finances.data.common.CathegoryItem;
import java.util.Collection;

import valerij_timakov.home_finances.conf.Conf;
import valerij_timakov.home_finances.data.common.CathegoryItem;
import valerij_timakov.home_finances.exceptions.AppExceptionWrongState;
import valerij_timakov.home_finances.exceptions.AppPersProviderException;
import valerij_timakov.home_finances.exceptions.AppPersistentException;
import valerij_timakov.home_finances.exceptions.wrongarg.AppExceptionNullArgument;
import valerij_timakov.home_finances.persistent.storages.finances.ICathegoryStorage;

public class TestCaths {

	
	public static void main(String[] args) throws AppPersProviderException, AppExceptionNullArgument, AppExceptionWrongState, AppPersistentException {
		ICathegoryStorage cathStorage = Conf.getInstance().getBean("cathegoryStorage", ICathegoryStorage.class);
		cathStorage.addCathegory(new CathegoryItem(0, "new", 2, 0));
//		print(cathStorage.getAllUserCathegories(2).values());
//		print(cathStorage.getCathegories(4).values());
//		cathStorage.removeCathegory(4);
//		cathStorage.updateCathegory(new CathegoryItem(3, "changed", 3, 2));
	}
	
	private static <T> void print(Collection<T> items) {
		for (T item : items) {
			System.out.println(item.toString());
		}
	}
}
